import com.bjpowernode.entity.Student;
import com.bjpowernode.service.StudentService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTest01 {

    @Test
    public void test01(){
        String configure= "spring.xml";
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext(configure);
        System.out.println("容器对象的信息"+applicationContext);

        //获取service对象
        StudentService service=(StudentService)applicationContext.getBean("studentService");

        Student student=new Student(11,"明思宗","55s9.com",52);

        service.register(student);

    }
}
